﻿using System;
using System.Windows.Forms;
using NDK.Module.DAL;
using NDK.Module.Model;


namespace NDK.Frm
{
    public partial class Dlg_loginMes : Form
    {
        public Dlg_loginMes()
        {
            InitializeComponent();
        }

      

        private void bt_login_Click(object sender, EventArgs e)
        {
            Mes mes=new Mes();
            mes.URL = tb_server.Text;
            mes.username = tb_username.Text;
            mes.password = tb_password.Text;
            mes.siteId = tb_siteid.Text;
            mes.operation = tb_operation.Text;
            mes.resource = tb_resource.Text;
            mes.dcgroup = tb_DCGroup.Text;

            MesServices mesServices = new MesServices();
            mesServices.Update(mes);
            //string resource = "A5A33-07";
            //XWDMesUpload uploadXWDMes = new XWDMesUpload();
            ////登录
            //Dictionary<string, string> loginResult = uploadXWDMes.login(Common.MesUrl, username, password, siteId, operation, resource);
            //if (loginResult["STATUS"] == "true")
            //{
            //    Common.MesJession = loginResult["RESULT"];
            //}
            //else
            //{
            //    MessageBox.Show("登录MES失败");
            //}



        }


    }
}
